package com.api.test;

public enum UrnType {

	GROUP("syncrum:sharegroup:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),

	DOCUMENT("syncrum:document:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),

	TASK("syncrum:task:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),

	GROUP_INVITATION("syncrum:sharegroupinvitation:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),

	CONTACT_INVITATION("syncrum:contactInvitation:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),

	IMAGE("syncrum:image:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),

	DOMAIN("syncrum:domain:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),

	ZLINK("http://files.*/*");

	private final String urnPattern;

	private UrnType(String pattern) {

		if (pattern == null) {

			throw new IllegalArgumentException("Pattern cannot be null");
		}

		this.urnPattern = pattern;
	}

	public String getPattern() {

		return urnPattern;
	}
}
